package com.lzit.smart_canteen.domain;

import jakarta.persistence.*;

import java.math.BigDecimal;
import java.util.Date;

/*
t_order_item
(
    `id`          int primary key auto_increment,
    `fname`       varchar(60),
    `win`         int,
    `status`      varchar(30),
    `price`       decimal(11, 2),
    `count`       int,
    `fid`         int,
    `uid`         int,
    `time`        datetime,
    `finish_time` datetime,
    `oid`         varchar(60)
)
 */
@Entity(name = "t_order_item")
public class OrderItem {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private String fname;
    @Column(name = "win")
    private Integer window;
    private String status;
    private BigDecimal price;
    private Integer count;
    private Integer fid;
    private Integer uid;
    private Date time;
    private Date finish_time;
    private String oid;

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", fname='" + fname + '\'' +
                ", window=" + window +
                ", status='" + status + '\'' +
                ", price=" + price +
                ", count=" + count +
                ", fid=" + fid +
                ", uid=" + uid +
                ", time=" + time +
                ", finish_time=" + finish_time +
                ", oid='" + oid + '\'' +
                '}';
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    public Integer getWindow() {
        return window;
    }

    public void setWindow(Integer window) {
        this.window = window;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getFid() {
        return fid;
    }

    public void setFid(Integer fid) {
        this.fid = fid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Date getFinish_time() {
        return finish_time;
    }

    public void setFinish_time(Date finish_time) {
        this.finish_time = finish_time;
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }
}
